package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.domain.OrderItem;
import cn.wolfcode.trip.base.query.OrderQueryObject;
import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


public interface IOrderService {


    void changeOrderstatus(OrderQueryObject qo);

    PageInfo<Order> query(OrderQueryObject qo);

    void saveOrUpdate(Order order);

    void UpdateOrder(Order order);

    void payOrder(Order order, Long[] pids);

    /**
     * 查询当前登录用户的所有订单
     * @param userId
     */
    List<Order> getCurrentAllOrder(Long userId);

    /**
     * 根据当前订单id查询订单明细
     * @param id
     * @return
     */
    List<OrderItem> getCurrentAllOrderItem(Long orderId);

    List<Order> getStatusOrder(Long userId, Integer status);
    List<Map> getStatusOrders(Long userId, Integer status);

    List<Map>  countOrder();

    Order getOrder(Long oid);
    //OrderItem getCurrentOrderItem(Long orderId);


}
